package com.ruoyi.ring.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 生理期信息对象 az_user_physiology
 * 
 * @author liuwp
 * @date 2025-09-30
 */
@Data
public class UserPhysiology extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 生理周期设置ID */
    @Excel(name = "生理周期设置ID")
    private Long periodId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 生理期天数 */
    @Excel(name = "生理期天数")
    private Long menstrualPeriodDays;

    /** 周期天数 */
    @Excel(name = "周期天数")
    private Long periodDays;

    /** 生理期开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生理期开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /** 预测生理期（记录日用逗号隔开） */
    @Excel(name = "预测生理期", readConverterExp = "记=录日用逗号隔开")
    private String predictMenstrualPeriod;

    /** 生理期（记录日用逗号隔开） */
    @Excel(name = "生理期", readConverterExp = "记=录日用逗号隔开")
    private String menstrualPeriod;

    /** 排卵日 */
    @Excel(name = "排卵日")
    private String ovulationDay;

    /** 排卵期（记录日用逗号隔开） */
    @Excel(name = "排卵期", readConverterExp = "记=录日用逗号隔开")
    private String ovulationPeriod;

    /** 更新本月生理期开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新本月生理期开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updStartDate;

    /** 更新本月生理期结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新本月生理期结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updEndDate;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("periodId", getPeriodId())
            .append("userId", getUserId())
            .append("menstrualPeriodDays", getMenstrualPeriodDays())
            .append("periodDays", getPeriodDays())
            .append("startDate", getStartDate())
            .append("predictMenstrualPeriod", getPredictMenstrualPeriod())
            .append("menstrualPeriod", getMenstrualPeriod())
            .append("ovulationDay", getOvulationDay())
            .append("ovulationPeriod", getOvulationPeriod())
            .append("updStartDate", getUpdStartDate())
            .append("updEndDate", getUpdEndDate())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
